package com.entrogy.service;

import com.entrogy.bean.*;

import java.util.List;


/**
 * @ClassName CourseSystemService
 * @Description
 * @Author luoxingjiang
 * @Date 2019-11-19 下午 6:29
 * @Version 1.0
 **/
public interface CourseSystemService {

    /**
     * 添加课程
     * @param course
     * @return
     */
    int insertCourse(CourseSystemCourseEntity course);

    /**
     * 删除课程
     * @return
     * @param courseId
     */
    boolean deleteCourse(Integer courseId);

    /**
     * 查询课程
     * @param courseId
     * @param courseName
     * @param schoolCode
     * @param isFinish
     * @param teacherName
     * @param enableStatus
     * @return
     */
    List<CourseSystemCourseEntity> listCourse(Integer courseId, String courseName, Integer schoolCode, Boolean isFinish, String teacherName, Integer enableStatus);

    /**
     * 查询开课时间详情
     * @param courseId
     * @return
     */
    List<CourseSystemCourseTimeEntity> listCourseTime(Integer courseId);

    /**
     * 编辑课程
     * @param course
     * @return
     */
    Integer updateCourse(CourseSystemCourseEntity course);

    /**
     * 查询课程教师安排
     * @param courseId
     * @return
     */
    List<CourseSystemCourseArrangeEntity> listCourseTeacherArrange(Integer courseId);

    /**
     * 查询课程限制
     * @param courseId
     * @param schoolCode
     * @return
     */
    List<CourseSystemCourseLimitEntity> listCourseLimit(Integer courseId, Integer schoolCode);

    /**
     * 查询教师的开课列表
     * @param teacherId
     * @param courseName
     * @param isFinish
     * @return
     */
    List<CourseSystemCourseEntity> listTeacherCourse(String teacherId, String courseName, Boolean isFinish);

    /**
     * 查询选课学生
     * @param courseId
     * @param studentName
     * @return
     */
    List<ClassStudentEntity> listCourseStudent(Integer courseId, String studentName);

    /**
     * 选课
     *
     * @param uid
     * @param courseId
     * @param studentId
     * @return
     */
    boolean chooseCourse(String uid, Integer courseId, Integer studentId);

    /**
     * 查看学生已选课程
     * @param studentId
     * @return
     */
    List<CourseSystemCourseEntity> listStudentCourse(Integer studentId);

    /**
     * 教师查看自己创建的课程
     * @param uid
     * @param courseName
     * @param isFinish
     * @param enableStatus
     * @return
     */
    List<CourseSystemCourseEntity> listTeacherCreateCourse(String uid, String courseName, Boolean isFinish, Integer enableStatus);

    /**
     * 启用课程
     * @param courseId
     * @param enableStatus
     * @return
     */
    boolean enableCourse(Integer courseId, Integer enableStatus);

    /**
     * 教师为学生评分
     * @param studentScoreList
     * @return
     */
    boolean teacherGiveScore(List<CourseSystemStudentScoreEntity> studentScoreList);

    /**
     * 删除选课学生
     * @param courseChooseId
     * @return
     */
    boolean deleteStudent(Integer courseChooseId);

    /**
     * 查询学生用于点名
     * @param courseId
     * @param weekOrder
     * @param dayOfWeek
     * @param courseOrder
     * @param studentName
     * @param studentId
     * @return
     */
    List<StudentBasicInfoEntity> listStudentCheckRecord(Integer courseId, Integer weekOrder, Integer dayOfWeek, Integer courseOrder, String studentName, Integer studentId);

    /**
     * 教师进行学生点名，新增点名记录
     * @param courseAttendanceList
     * @return
     */
    boolean checkStudent(List<CourseSystemAttendanceEntity> courseAttendanceList);

    /**
     * 教师修改以前的点名记录，修改点名记录
     * @param courseAttendance
     * @return
     */
    boolean updateCheckStudentStatus(CourseSystemAttendanceEntity courseAttendance);

    /**
     * 选了课程的学生计数
     * @param courseId
     * @param classId
     * @return
     */
    int countChooseStudent(Integer courseId, Integer classId);

    /**
     * 查询家长或者孩子的选课记录
     * @param uid
     * @param studentId
     * @param courseName
     * @param teacherName
     * @param isFinish
     * @return
     */
    List<CourseSystemParentCourseEntity> listParentOrStudentCourse(String uid, Integer studentId, String courseName, String teacherName, Boolean isFinish);

    /**
     * 家长退课
     * @param courseChooseId
     * @return
     */
    boolean dropCourse(Integer courseChooseId);

    /**
     * 家长评价老师
     * @param courseChooseId
     * @param evaluateTeacher
     * @param parentScore
     * @return
     */
    boolean evaluateTeacher(Integer courseChooseId, String evaluateTeacher, Integer parentScore);

    /**
     * 查询选课学生，不按班级分类
     * @param courseId
     * @return
     */
    List<StudentBasicInfoEntity> listCourseStudentNotGroup(Integer courseId);

    /**
     * 查询该生的选课信息
     * @param studentId
     * @param courseId
     * @return
     */
    CourseSystemStudentScoreEntity getStudentChooseInfo(Integer studentId, Integer courseId);

    /**
     * 查询某一条选课的评价信息
     * @param courseChooseId
     * @return
     */
    CourseSystemChooseEvaluateEntity getCourseChooseInfo(Integer courseChooseId);
}
